package com.zzj.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.math.BigDecimal;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author zzj
 * @since 2022-12-06
 */
@TableName("mingli_product")
@Data
@Schema(name = "Product对象", description = "商品表")

public class Product implements Serializable {

  private static final long serialVersionUID = 1L;

  @TableId(value = "id", type = IdType.AUTO)
  private Integer id;

  @Schema(description = "分类id")
  private Integer categoryId;

  @Schema(description = "产品分类名称")
  private String categoryName;

  @Schema(description = "供应商id")
  private Integer supplierId;

  @Schema(description = "供应商名称")
  private String supplierName;

  @ExcelProperty(value = "商品条形码", index = 0)
  @Schema(description = "条码")
  private String barcode;

  @Schema(description = "删除状态：0未删除；1已删除")
  private Integer deleteStatus;

  @Schema(description = "排序")
  private Integer sort;

  @Schema(description = "销量")
  private Integer sale;
  @ExcelProperty(value = "零售价", index = 2)
  @Schema(description = "价格")
  private BigDecimal price;

  @ExcelProperty(value = "进货价", index = 3)
  @Schema(description = "批发价格")
  private BigDecimal wholesalePrice;

  @ExcelProperty(value = "商品标题", index = 1)
  @Schema(description = "商品名称")
  private String name;

  @Schema(description = "副标题")
  private String subTitle;
  @ExcelProperty(value = "库存", index = 4)
  @Schema(description = "库存")
  private Integer stock;

  @Schema(description = "库存预警值")
  private Integer lowStock;

  @Schema(description = "单位")
  private String unit;

  @Schema(description = "商品重量，默认为克")
  private BigDecimal weight;

  @Schema(description = "产品图片")
  private String pictures;

  @Schema(description = "商品描述")
  private String description;

}
